import { Component, _decorator } from 'cc';
export default class PromiseMgr {
    /**
    * 等待
    * @param time 时长（秒）
    * @example
    * await PromiseMgr.sleep(1);
    */
    public static sleep(time: number): Promise<void> {
        return new Promise(res => new Component().scheduleOnce(res, time));
    }
}